package org.csmzxy.class2334.duotai;

public class Example15 {
    public static void main(String[] args){
        Animal animal = new Cat();
        if(animal instanceof Dog1){
            Dog1 dog1 = (Dog1) animal;
            dog1.houseKeep();
        }else {
            System.out.println("对象类型向下转换不合法");
        }
    }
}
